package com.stone.design.patterns.filter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Stone
 * @version V1.0
 * @description:
 * @date 4/29/18 22:53
 * @email redsstone@163.com
 */
public class TestStudent {

    public static void main(String[] args) {
        List<Student> students = new ArrayList<>();
        students.add(new Student("张磊", SpecializedSubjectCode.COMPUTER_NETWORK));
        students.add(new Student("王美丽", SpecializedSubjectCode.MOBILE_COMMUNICATION));
        students.add(new Student("王五", SpecializedSubjectCode.COMPUTER_NETWORK));
        students.add(new Student("吴天", SpecializedSubjectCode.MOBILE_COMMUNICATION));
        students.add(new Student("张山", SpecializedSubjectCode.MOBILE_COMMUNICATION));
        students.add(new Student("高美", SpecializedSubjectCode.COMPUTER_NETWORK));

        Criteria d = new CriteriaComputerNetwork();
        Criteria b = new CriteriaMobileCommunication();

        List<Student> students1 = d.meetCriteria(students);

        System.out.println("计算机网络学生数量：" + d.getCount());
        printStudent(students1);





    }

    private static void printStudent(List<Student> students) {
        for (Student student : students) {
            System.out.println(student.toString());
        }
    }
}
